{$CLEO .CS}
0000:


29@ = 0
4@ = 0.0
for 0@ = 0 to 6 step 1
    0085: 5@ = 0@
    5@ *= 4
    #FAM1.load
    #mp5lng.load                                                                                                                                                                                                    
    038b:
    04C4: store_coords_to 1@ 2@ 3@ from_car $PLAYER_ACTOR with_offset 4@ 1.6 -1.0                                              
    18@ = actor.Create(GANG2, #FAM1, 1@,2@,3@)                        
    Actor.SetImmunities(18@, 1, 1, 1, 1, 1)
    if not Actor.HasWeapon(18@, 29)                                                                                                                                                                      
    then Actor.GiveWeaponAndAmmo(18@, 29, 999999)                                                                                                                                                        
    end          
    0337: set_actor 18@ visibility 0 
    07AF: $PLAYER_GROUP = player $PLAYER_CHAR group 
    0631: put_actor 18@ in_group $PLAYER_GROUP 
    06F0: set_group $PLAYER_GROUP distance_limit_to 9999.0 
    8@ = Object.Create(1608, 0.0, 0.0, 0.0)                                                                 
    071F: set_object 8@ health_to 99999                                                                     
    0750: set_object 8@ visibility 1                                                                        
    08D2: object 8@ scale_model 0.2                                                                         
    Object.CollisionDetection(8@) = false                                                                   
    069B: attach_object 8@ to_actor 18@ with_offset -0.01 0.0 -0.3 rotation 0.0 0.0 0.0                    
    Model.Destroy(1609)
    0AC6: 20@ = label @ahandle9 offset
    005a: 20@ += 5@
    0A8C: write_memory 20@ size 4 value 18@ virtual_protect 0
    0AC6: 20@ = label @ohandle9 offset
    005a: 20@ += 5@
    0A8C: write_memory 20@ size 4 value 8@ virtual_protect 0  
    4@ += 1.0                                                                                              
end


repeat
wait 0
0AB4: 21@ < 508
IF 21@ == TRUE
THEN BREAK
END
for 0@ = 0 to 6 step 1
    0085: 5@ = 0@
    5@ *= 4
    0AC6: 20@ = label @ahandle9 offset
    005a: 20@ += 5@
    0A8D: 18@ = read_memory 20@ size 4 virtual_protect 0
    0AC6: 20@ = label @ohandle9 offset
    005a: 20@ += 5@
    0A8D: 8@ = read_memory 20@ size 4 virtual_protect 0
    if 18@ > 0 
    jf continue
    if 8@ > 0 
    jf continue
    if 03CA:   object 8@ exists 

    if 056D:   actor 18@ defined
    jf continue                                                                   
    if not actor.Dead(18@)
    jf continue
    if 02E0:   actor 18@ firing_weapon 
    then
        gosub @min_fire9
    else 
        
    end
    GOSUB @get_criminal9
    IF 056D:   actor 31@ defined                                                                                                                               
    then gosub @attack9
        if 00F2:   actor 18@ near_actor 31@ radius 2.0 2.0 0
        then 069B: attach_object 8@ to_actor 31@ with_offset 0.0 0.5 0.0 rotation 0.0 0.0 0.0 
            05DB: AS_actor 31@ flee_from_actor 18@ from_origin_radius 50.0 timelimit -1 

        end
    else 069B: attach_object 8@ to_actor 18@ with_offset -0.01 0.0 -0.3 rotation 0.0 0.0 0.0
    end                   

end                                                                                                                                        
until false

for 0@ = 0 to 6 step 1
    0085: 5@ = 0@
    5@ *= 4
    0AC6: 20@ = label @ahandle9 offset
    005a: 20@ += 5@
    0A8D: 18@ = read_memory 20@ size 4 virtual_protect 0
    0AC6: 20@ = label @ohandle9 offset
    005a: 20@ += 5@
    0A8D: 8@ = read_memory 20@ size 4 virtual_protect 0
    if 056D:   actor 18@ defined
    THEN
        ACTOR.RemoveReferences(18@)
        ACTOR.DestroyInstantly(18@)
    END                                                               
    if 03CA:   object 8@ exists 
    then
        OBJECT.RemoveReferences(8@)
        OBJECT.Destroy(8@)
    end
end                              
END_THREAD


:min_fire9
      
0208: 14@ = random_float_in_ranges -0.6 0.6 
0208: 13@ = random_float_in_ranges -1.9 1.9
13@ += 1.5
04C4: store_coords_to 1@ 2@ 3@ from_car 18@ with_offset 0.0 0.6 -0.6
024F: create_corona_with_radius 0.2 type 2 lensflares 0 with_color 200 0 0 at 1@ 2@ 3@
GOSUB @get_criminal9
IF 056D:   actor 31@ defined                                                                                                                               
then 04C4: store_coords_to 5@ 6@ 7@ from_car 31@ with_offset 14@ 0.0 13@           
ELSE 0400: store_coords_to 5@ 6@ 7@ from_actor 8@ with_offset 14@ 200.0 13@
END 
06BC: create_M4_shoot_from 1@ 2@ 3@ target 5@ 6@ 7@ energy 100 
058A: create_gun_flash_from 1@ 2@ 3@ to 5@ 6@ 7@
097B: play_audio_at_object 8@ event 1157
066E: create_particle "GUNSMOKE" attached_to_object 8@ with_offset 0.0 0.6 -0.6 rotation 0.0 0 0.0 flag 1 store_to 10@ 
064C: make_particle 10@ visible 
064F: remove_references_to_particle 10@ 
return

:get_criminal9
29@++ 
if 29@ >= 150
then 29@ = 0
    Actor.StorePos($PLAYER_ACTOR, 21@, 22@, 23@)                                                                            
    if 0AE1: 31@ = random_actor_near_point 21@ 22@ 23@ in_radius 10.0 find_next 1 pass_deads 0 //IF and SET                
    then                                                                                                                                                              
        IF NOT 31@ == -1                                                                                                                                               
        then                                                                                                                                        
            IF 056D:   actor 31@ defined                                                                                                                               
            then                                                                                                         
                089F: get_actor 31@ pedtype_to 13@ 
                if and
                    not 13@ == 8
                    not 13@ == 0
                then
                else 31@ = -1
                end                                                                                          
            end                                                                                                          
        end                                                                                                              
    end                                                                                                                  
end
return
end_thread

:attack9
04C4: store_coords_to 10@ 11@ 12@ from_actor 31@ with_offset 0.0 7.0 5.0                      
                    04C4: store_coords_to 13@ 14@ 15@ from_actor 18@ with_offset 0.0 0.0 0.0                      
                    0063: 10@ -= 13@ // (float)                                                                            
                    0063: 11@ -= 14@ // (float)                                                                            
                    0063: 12@ -= 15@ // (float)                                                                            
                    10@ *= 20.0                                                                                           
                    11@ *= 20.0                                                                                           
                    Actor.StorePos(18@, 13@, 14@, 15@)                                                                      
                    08C7: put_actor 18@ at 13@ 14@ 15@ dont_warp_gang                                                       
                    083C: set_actor 18@ velocity_in_direction_XYZ 10@ 11@ 12@
                    return     



:ahandle9
hex
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
end

:ohandle9
hex
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
00 00 00 00
end